var express = require('express');
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res, next) {
  res.send('respond with a resource');
});

router.post('/login', (req, res) => {
  console.log('前端数据：', req.body);

  res.json({
    code: '200',
    token: 'xnksabckj',
    msg: '登陆成功',
    username: req.body.username
  });
});

module.exports = router;
